function isShow(dom, clientHeight, top) {
    if (top >= clientHeight) {
        dom.style.opacity = 0;
    } else {
        dom.style.opacity = 1;
    }
}
// 节流
function throttle(fn, delay) {

    let valid = true
    return function () {
        if (!valid) {
            //休息时间 暂不接客
            return false
        }
        // 工作时间，执行函数并且在间隔期内把状态位设为无效
        valid = false
        setTimeout(() => {
            fn()
            valid = true;
        }, delay)
    }
}

function showTop() {
    let clientHeight = document.documentElement.clientHeight;
    [...document.getElementsByClassName('project_bx')].map((it) => {
        isShow(it, clientHeight, it.getBoundingClientRect().top);
    })
}

window.onscroll = throttle(showTop, 200);